string "string" 'strint111' "asdfasf;lj' 'afasfas'"adfasfsa" "str" + "ing" "copy" * 3 x="a" x < "b" x < "aa" x < "A" "b" < "A" "!" < "," 'aaa' < 'ab' 'asa' < 'aB'ra "ou" in "color" "Don't \nneed tripe quotes to \nget new lines" "\'" "\""#Note that here python used single quotes to denote the string. "\ttest"#What if we want a backslash, "\\" # Converting ints to strings. x = "string" len(x) len("") x=10 y = "string" "string " + x "string " + 'x' "string " + str(x) #Can be a lot of work if we just want to print something y = "string " print y, x print "es\nca\t\"pe characters are formatted" #back to slides print ÒMy age is %d.Ó % age print ÒPersonÒ, name, Òhas heightÓ, \ height, ÒageÒ, age, ÒweightÒ, weight print ÒPerson %s has weight %.2f \ and age %d and height %d.Ò \ % (name, weight, age, height)#back to slides. name = raw_input() name age = raw_input() age age + 34 int(age) + 34 raw_input('I am a string') int(name) #they actually need to be numbers. #break #Load madlib, and write importer.py that imports it, or import it from shell. import madlib madlib.thank_you("a","fd","234","234234") import madlib #If we import it again, it only runs once. Save shell. #Ask how we can #we can get rid of this annoyance by commenting out the code. But that's not very efficient. #Note that other code we've run has this mystical if __name__ == "__main__" bit.#back to slides. #modify madlib to have an if name block. import madlib from madlib import * from junk import * thank_you(,,,)#back to slides. help(str) help(int) help(float) s.count() s.upper() s.lower() s.len()#back to slides.